package com.by.controller;

import com.by.biz.DistrictBiz;
import com.by.pojo.District;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class DistrictController {

    @Autowired
    private DistrictBiz districtBiz;

    @RequestMapping("/toAddAir")
    public String toAddAir(Model model) {
        List<District> list = districtBiz.getAllDistrict();
        model.addAttribute("list", list);
        return "airAdd";
    }
}
